<?php
include_once("connect.php");

$query=mysql_query("select * from sortlist where id=1");
if($rs=mysql_fetch_array($query)){
   	$sort=$rs['sort'];
}
$sort_arr=explode(",",$sort);
$len=count($sort_arr);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="marquee, jquery插件" />
<meta name="description" content="Helloweba演示平台，演示XHTML、CSS、jquery、PHP案例和示例" />
<title>Hans的演示-网址收藏插件</title>
<link rel="stylesheet" type="text/css" href="../css/main.css" />
<style type="text/css">
h1,h2,h3 {padding:0;margin:0;}
li {list-style:none;}
#module_list{margin-left:4px; width:500px;}
.modules{float:left; width:200px; height:24px; margin:10px; border:1px solid #acc6e9;text-align:center;}
#loader{height:24px; text-align:center}
.clear{clear:both}

.modules {
    padding:5px 0 2px 10px;  
}

.modules a {
    margin-right:15px;
    display:block;
}

.link {
    cursor:move;
    float:left;    
    margin-right:5px;
    width:120px;
}

.act-rename {    
    background:url(menu_bg_211471e2.png) no-repeat -50px -74px;
    width:16px;
    height:16px;    
    float:left;
}

.act-delete {    
    background:url(menu_bg_211471e2.png) no-repeat -69px -74px;
    width:16px;
    height:16px;   
    float:left;
}

.act-rename:hover {
     background:url(menu_bg_211471e2.png) no-repeat -50px -92px;
}
.act-delete:hover {
    background:url(menu_bg_211471e2.png) no-repeat -69px -92px;
}

</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js'></script>
<script type="text/javascript" src="idrag.js"></script>
</head>

<body>

<div id="main">
  <h2 class="top_title"><a href="#">网址收藏--动态排序</a></h2>
  <div id="loader"></div>
  <ul id="module_list">
   <input type="hidden" id="orderlist" value="<?php echo $sort;?>" />
   <?php 
     for($i=0;$i<$len;$i++){
   ?>
   <li class="modules" title="<?php echo $sort_arr[$i]; ?>">
      <a class="link">Module:<?php echo $sort_arr[$i]; ?></a>
      <a class="act-rename" href="javascript:;"></a>
      <a class="act-delete" href="javascript:;"></a>
      <br style="clear:both;" />
   </li>
   <?php } ?>
   <div class="clear"></div>
  </ul>
</div>

</body>
</html>